import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Center(
          child: Text(
            "appbar",
            textDirection: TextDirection.ltr,
            style: TextStyle(
                fontSize: 10,
                color: Colors.green,
                fontWeight: FontWeight.bold
            ),
          ),
        ),
        backgroundColor: Colors.deepPurpleAccent,
      ),
      body: Hoempage(),
    ),
  ));
}
class Hoempage extends StatelessWidget {
  const Hoempage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const Text.rich(TextSpan(
        text: "hello world",
        style: TextStyle(color: Colors.deepPurpleAccent,fontSize: 20),
        children: [
          TextSpan(text: "hhh",style:TextStyle(color: Colors.deepPurpleAccent,fontSize: 20), ),
          TextSpan(text: "hhh",style:TextStyle(color: Colors.deepPurpleAccent,fontSize: 20), ),
          WidgetSpan(child: Icon(Icons.favorite,color: Colors.red,)),
          TextSpan(text: "hhh",style:TextStyle(color: Colors.deepPurpleAccent,fontSize: 20), )
        ]
    )
    );
  }
}
